package com.wei.web.middleware.httpfilter.registrar.filter.factory;

import com.wei.web.middleware.httpfilter.filter.factory.IFilterFactory;
import jakarta.servlet.Filter;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.config.AbstractFactoryBean;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;

import java.util.HashSet;

public class FactoryFilterRegistrarFactoryBean extends AbstractFilterRegistrarFactoryBean {

    private IFilterFactory filterFactory;

    @Override
    public Filter getFilter() {
        return filterFactory.getFilter();
    }


    public IFilterFactory getFilterFactory() {
        return filterFactory;
    }

    public void setFilterFactory(IFilterFactory filterFactory) {
        this.filterFactory = filterFactory;
    }

}
